package org.springblade.modules.repair.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description 地图-救援人员信息
 * @Author ysq
 * @Date 2023/6/12
 **/
@Data
public class MapUserInfoVO {

	@ApiModelProperty(value = "用户id")
	private Long userId;

	@ApiModelProperty(value = "经度")
	private String longitude;

	@ApiModelProperty(value = "纬度")
	private String latitude;

	@ApiModelProperty(value = "今天是否有考勤打卡")
	private Boolean isSign;

	@ApiModelProperty(value = "定位时间")
	private Date createTime;

	@ApiModelProperty(value = "任务状态集合 【2-救援，3-维修，4-保养】")
	List<Integer> planTypes;

	@ApiModelProperty(value = "是否已到达")
	private Boolean isArrived;

	@ApiModelProperty(value = "交通工具")
	private String vehicle;

	@ApiModelProperty(value = "人员姓名")
	private String realName;

	@ApiModelProperty(value = "头像url")
	private String avatar;

	@ApiModelProperty(value = "人员距离项目距离")
	private Integer distance;

	@ApiModelProperty(value = "电话")
	private String phone;

	@ApiModelProperty(value = "用户中文编码")
	private String userZhCode;

	@ApiModelProperty(value = "部门id")
	private String deptId;

	@ApiModelProperty(value = "技能key")
	private String skillKey;

	@ApiModelProperty(value = "技能")
	private String skillName;

	@ApiModelProperty(value = "居住经度")
	private String residentialLongitude;

	@ApiModelProperty(value = "居住纬度")
	private String residentialLatitude;

	@ApiModelProperty(value = "今日任务 【0-已完成保养工单数，1-总保养数，2-尚未完成维修数，3-尚未完成救援数】")
	private Map<Integer, Long> planStatistics;

	@ApiModelProperty(value = "是否是电梯所属区组人员")
	private boolean isElevatorGroupUser;

	public Map<Integer, Long> getPlanStatistics() {
		if (this.planStatistics == null) {
			return new HashMap<>(2);
		}
		return planStatistics;
	}
}
